package com.zenchn.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * web菜单树实体类
 *
 * @author dingxinfa
 * @date 2018-08-15
 **/
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value="系统菜单树",description="系统菜单树")
public class MenuVO {

    @ApiModelProperty(value="权限菜单ID")
    private String id;

    @ApiModelProperty(value="权限菜单层级")
    private Integer level;

    @ApiModelProperty(value="权限菜单名称")
    private String name;

    @ApiModelProperty(value="菜单访问url")
    private String url;

    @ApiModelProperty(value="菜单打开方式")
    private String target;

    @ApiModelProperty(value="图标样式")
    private String icon;

    @ApiModelProperty(value="子集菜单")
    private List<MenuVO> children;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name!=null?name:"";
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url!=null?url:"";
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon!=null?icon:"";
    }

    public List<MenuVO> getChildren() {
        return children;
    }

    public void setChildren(List<MenuVO> children) {
        this.children = children;
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target!=null?target:"";
    }

    @Override
    public String toString() {
        return "MenuVO{" +
                "id='" + id + '\'' +
                ", level=" + level +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                ", target='" + target + '\'' +
                ", icon='" + icon + '\'' +
                ", children=" + children +
                '}';
    }
}
